from django.shortcuts import render, HttpResponse


# Create your views here.
def index(request):
    if request.method == 'POST':
        i1 = request.POST.get('i1')
        i2 = request.POST.get('i2')
        i3 = int(i1) + int(i2)

    return render(request, 'index1.html', locals())


def calc(request):
    x1 = request.GET.get('x1')
    x2 = request.GET.get('x2')
    print(x1, x2)
    x3 = int(x1) + int(x2)

    return HttpResponse(x3)
